package com.etc.dao;

import com.etc.model.User_attendance;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface User_attendanceMapper {
    int deleteById(Integer id);

    int insert(User_attendance record);

    int insertSelective(User_attendance record);

    User_attendance findById(Integer id);

    int updateByPrimaryKeySelective(User_attendance record);

    int updateByPrimaryKey(User_attendance record);

    //获取日期所有的数量
    List<User_attendance> findAllByUsernameAndClassnode(@Param("username") String username
            , @Param("classnode") String classnode);

    List<User_attendance> findAllByAttendanceAndClassnode(@Param("attendance") String attendance
            , @Param("classnode") String classnode);

    List<User_attendance> findAllByNameAndClassnode(@Param("name") String name
            , @Param("classnode") String classnode);

    List<User_attendance> findAllByUsernameAndClassnodeOrderByIdAsc(@Param("username") String username
            , @Param("classnode") String classnode);

    List<User_attendance> findAllByClassnode(@Param("classnode") String classnode);

    List<User_attendance> findAllByNameAndClassnodeOrderByIdAsc(@Param("name") String name
            , @Param("classnode") String classnode);

    int deleteAll(@Param("user_attendances") List<User_attendance> user_attendances);

}